package com.wtwd.campus.receiver;

import com.wtwd.campus.entity.MqTextData;
import com.wtwd.campus.service.InjectFeignService;

public class SendTextReceiver  implements Receiver{
    @Override
    public String parseMessage(String data) {
        //*WT,IMEI,TEXTINFORM,HHMMSS#
        String[] split = data.split(",");
        String imei = split[1];
        String messageType = split[2];
        String commandNumber = split[3];
        MqTextData mqTextData=new MqTextData();
        mqTextData.setImei(imei);
        mqTextData.setCommandNumber(commandNumber);
        InjectFeignService.getIrmFeignClientService().sendTextReply(mqTextData);
        return imei;
    }
}
